package com.example.factory.simple;

import com.example.factory.Computer;
import com.example.factory.product.AsusComputer;
import com.example.factory.product.HpComputer;
import com.example.factory.product.LenovoComputer;

public class ComputerFactory1 {
    public static Computer createComputer(String type){
        Computer computer = null;
        switch (type){
            case "Lenovo":
                computer = new LenovoComputer();
                break;
            case "hp":
                computer = new HpComputer();
                break;
            case "asus":
                computer = new AsusComputer();
                break;
        }
        return computer;
    }

}
